Apologies first if this is a stupid mistake on my part, but I am
having difficulties compiling the libclamav example on OS X, using GCC
4.0/4.2 through Xcode and GCC 4.0 through the terminal. The result is
the same regardless of GCC version. I have no compile issues in the
code, the issue presents when linking the object files. The output is
below.
(clamav itself installed quite simply. The only issue I had there was
that I had to upgrade GCC, which I did by upgrading Xcode.)
Thanks in advance,
Oliver
----
Xcode using GCC 4.2
----
Building target “example_av” of project “example_av” with
configuration “Debug” — (6 errors)
cd /Users/oliver/example_av
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/SDKs/
MacOSX10.5.sdk -L/Users/oliver/example_av/build/Debug -F/Users/oliver/
example_av/build/Debug -filelist /Users/oliver/example_av/build/
example_av.build/Debug/example_av.build/Objects-normal/i386/
example_av.LinkFileList -mmacosx-version-min=10.5 -o /Users/oliver/
example_av/build/Debug/example_av
Undefined symbols:
"_cl_scandesc", referenced from:
_main in main.o
"_cl_strerror", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_free", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_build", referenced from:
_main in main.o
"_cl_load", referenced from:
_main in main.o
"_cl_retdbdir", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"_cl_scandesc", referenced from:
_main in main.o
"_cl_strerror", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_free", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_build", referenced from:
_main in main.o
"_cl_load", referenced from:
_main in main.o
"_cl_retdbdir", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (6 errors)
----
Xcode using GCC 4.0
----
Building target “example_av” of project “example_av” with
configuration “Debug” — (6 errors)
cd /Users/oliver/example_av
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/
MacOSX10.5.sdk -L/Users/oliver/example_av/build/Debug -F/Users/oliver/
example_av/build/Debug -filelist /Users/oliver/example_av/build/
example_av.build/Debug/example_av.build/Objects-normal/i386/
example_av.LinkFileList -mmacosx-version-min=10.5 -o /Users/oliver/
example_av/build/Debug/example_av
Undefined symbols:
"_cl_scandesc", referenced from:
_main in main.o
"_cl_strerror", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_free", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_build", referenced from:
_main in main.o
"_cl_load", referenced from:
_main in main.o
"_cl_retdbdir", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"_cl_scandesc", referenced from:
_main in main.o
"_cl_strerror", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_free", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_cl_build", referenced from:
_main in main.o
"_cl_load", referenced from:
_main in main.o
"_cl_retdbdir", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (6 errors)
----
GCC 4.0 from terminal
----
Undefined symbols:
"_cl_scandesc", referenced from:
_main in cc6x18NA.o
"_cl_strerror", referenced from:
_main in cc6x18NA.o
_main in cc6x18NA.o
_main in cc6x18NA.o
"_cl_free", referenced from:
_main in cc6x18NA.o
_main in cc6x18NA.o
_main in cc6x18NA.o
"_cl_build", referenced from:
_main in cc6x18NA.o
"_cl_load", referenced from:
_main in cc6x18NA.o
"_cl_retdbdir", referenced from:
_main in cc6x18NA.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml