Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   About libs and "Error 30 error LNK2001: unresolved external symbol _..." (http://www.go4expert.com/forums/libs-error-30-error-lnk2001-unresolved-t6844/)

.dorian 15Oct2007 14:40

About libs and "Error 30 error LNK2001: unresolved external symbol _..."
 
hey guys,

iam a java prgrammer who is new to c/c++.
I have a big VS.net c++ project file here and try to understand it in order
to transfer it to another system.

the project inlcudes a *.lib file (project properties > Linker > input). When this file is included, the program compiles and links well, when i remove it, (of course ) not doesnt anymore. i get error messages like :

" Error 30 error LNK2001: unresolved external symbol _x264_cpu_cpuid cpu.obj "

the funny part is that the function" x264_cpu_cpuid" is defined and declared in one of the project source and header files. so the linker doesnt really need some extra lib files.

for what is this (1.7 mb large) lib file used, and how can i get rid of it ? (my target compiler cant load VS lib files)


i hope you can help me
thanks
dorian

ps: if somebody has the time, i would send him the hole folder - to make it easer

shabbir 15Oct2007 14:46

Re: About libs and "Error 30 error LNK2001: unresolved external symbol _..."
 
You have defined x264_cpu_cpuid function but not _x264_cpu_cpuid. See the underscore at the begining.

I hope that clears thing out.

.dorian 15Oct2007 15:00

Re: About libs and "Error 30 error LNK2001: unresolved external symbol _..."
 
hey shabbir,

i didnt find any (example here) _x264_cpu_cpuid calls in the programm. In addition I couldnt find anything in the source code that links to the included lib file. Its just added, but it seems that nothing is done with it.

All the functions the linker asks for are written (of course they dont have this underscroe =) ...

Why does the linker needs this lib file, and how can i write a "lib-free" program ?

thanks
dorian

shabbir 15Oct2007 15:07

Re: About libs and "Error 30 error LNK2001: unresolved external symbol _..."
 
You might not be calling but some function you are using may be calling it.


All times are GMT +5.5. The time now is 17:55.