Log in

No account? Create an account
No One Really [entries|archive|friends|userinfo]
No One Really

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Mar. 24th, 2007|11:29 am]
No One Really
[Current Mood |sicksick]

C makes my head hurt. Java is like sweet, sweet aspirin.

push error LNK2019: unresolved external symbol "public: int __thiscall AI::calcMove(int,int,enum GameState::Color (* const)[20],int * const)" (?calcMove@AI@@QAEHHHQAY0BE@W4Color@GameState@@QAH@Z) referenced in function "public: void __thiscall AI::action(class GameState *,int,int)" (?action@AI@@QAEXPAVGameState@@HH@Z)

What the hell kind of error message is that? o_O

Come on, you C++ programmers, I await your mockery. For now, I'm going with a simpler solution.

From: (Anonymous)
2007-03-26 03:41 pm (UTC)

C is pure bliss.

The thing I love about C that keeps me coming back to it is that it doesn't assume that I need to be coddled; It figures that if I malloc() that I will free().

I enjoy the power, even if with great power comes great repsonsibility. *ducks from all the bottles being thrown in his direction*

Anyways, any unresolved external symbol is just that. The compiler (actually the linker, which is usually seperate program (ld on gnu/*nix, not sure what's in Visual Studio anymore, LINK.EXE I think)) is saying "Hey, you're calling this function XXX but it's not in your code, nor is it any statically linked libraries that you've specified (-l with gcc/ld in a Makefile, Dependencies section under Linker in the project properties in Visua Studio IIRC.)

The other things that it's adding after the function name is something C++ does to support function overloading (so that each variant of the function has a unique name in the linker. Not really a big deal unless you're trying to dynamically look up and link to a C++ function. That's when you'd just tell it to link using C linking instead via extern "C".)

- Greg
(Reply) (Thread)
From: noonereally
2007-04-15 04:15 am (UTC)

Re: C is pure bliss.

Yeah, I eventually saw that I was missing my namespace from the function declaration, or something like that.

Here's my beef, really. The things that C++ makes me do (malloc/free, for example) are generally things that the computer can do as well, for some small processing cost. And by freeing me from doing that, I can worry about the higher level things that the computer cannot do as well.

No one codes in assembly anymore.

I'm not saying Java is the One True Answer(tm), btw. I'm just saying I hate that it doesn't bounds check my arrays. ;-)

Although I'm sure I could use boost instead of arrays, anyway.
(Reply) (Parent) (Thread)