0
0

I get following linker error trying to build a project I am trying to integrate fmod with. This is a Visual Studio .NET 2003 environment. I’ve got the fmodex_vc.lib library setup for the project settings but still these errors seem to persist. Any thoughts on what might be the cause here?

[quote:3675anzo] error LNK2019: unresolved external symbol _FMOD_System_Create referenced in function "enum FMOD_RESULT __cdecl FMOD::System_Create(class FMOD::System * *)" (?System_Create@FMOD@@YA?AW4FMOD_RESULT@@PAPAVSystem@1@@Z)[/quote:3675anzo]

  • You must to post comments
0
0

i suppose you mean win32 :)

i just put this in the 3d demo example in fmod designer api and it linked fine

{
    int curr, max;

    result = FMOD::Memory_GetStats(&curr, &max);

}
  • You must to post comments
0
0

have you tried the fmod example .sln project it builds and links all the examples fine.

  • You must to post comments
0
0

Yeh the examples build fine. It looks like it’s an issue with my custom project. I’ve developed a workaround which is to isolate fmod in a DLL which I then link to my project. It’s not the ideal solution in my mind but it does keep everything isolated and in the end it gets my what I need so I’m happy. Thanks for the reply brett.

  • You must to post comments
0
0

maybe the #defines at the top of fmod.h aren’t being parsed correctly because you have undeffed them or something. It seems like it is looking for a cdecl symbol when it should be stdcall.

  • You must to post comments
0
0

You certainly could have something there brett. Certainly the project settings in Visual Studio note to use __cdecl as the calling convention. That could be it. I’m going with my alternate plan for now as I’m pressed for time but I will look into it at a later date.

  • You must to post comments
0
0

We too have the same problem with our custom project, while the examples build fine. Turned out to be the cdecl stuff, but the existing code will not work without it.

I recall there was a way to override these calling conventions.

  • You must to post comments
0
0

fmod’s header declares F_API to stdcall because thats what the symbols in the dll are. The default setting in your project is irrelevant.

[code:nt5d9zvf]

elif (defined(WIN32) || defined(WIN32) || defined(_WIN64) || defined(_XBOX))

#define F_CDECL _cdecl
#define F_STDCALL _stdcall

[/code:nt5d9zvf]

is the important bit, so maybe you have undef’ed one of the required symbols listed there

  • You must to post comments
0
0

You are right. The 3D example project in FMOD does not set stdCall in the project, yet it functions. I have not touched any of the FMOD files so the defines are intact.

Something is strange, though. If I comment out the following:

[code:446inbtb]
#define F_CDECL _cdecl
#define F_STDCALL _stdcall
#define F_DECLSPEC __declspec
#define F_DLLEXPORT ( dllexport )
[/code:446inbtb]

I get no additional errors. It seems the #else below is the one being used, and I’m definatly on Win32. :)

[size=150:446inbtb][b:446inbtb]Edit:[/b:446inbtb][/size:446inbtb] [b:446inbtb]Forcing Win32 in the Preprocessor did the trick! Odd that it is required, but works nevertheless. Thanks alot Brett for giving me a bone.[/b:446inbtb]

  • You must to post comments
0
0

So what was set instead? (in the project settings)
Why didn’t you have the preprocessor switch that is put there every time you create a new project in devstudio? That isnt shouldnt happen.

  • You must to post comments
0
0

Nothing, it was blank. I took our zLib static library project and just copied it into a new one, and it obviously did not contain any defines. I did it to see if we could get FMOD to finally compile together with our engine. So the project was not created by VS.

I must have overlooked the preprocessor when comparing against the FMOD 3D Example. Now to work around the memory managing stuff :) Thanks again!

  • You must to post comments
0
0

i’m getting a linker error when i try to use FMOD::Memory_GetStats … I am definitely defining WIN33 in my preprocessor settings and my calling convention is _cdecl. i can use FMOD::EventSystem_Create with no problem.

i’m also using vs 2003

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.