any idea about the following error?

RCF support and general discussion.
Post Reply
markqiu
Posts: 18
Joined: Wed Sep 12, 2012 11:13 am

any idea about the following error?

Post by markqiu »

envirnment: ubuntu 12.04 x64, gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

markqiu@markqiu-Latitude-E6420:~/dev/RCF-2.0.0.2685/demo/cmake/bin$ make all
-- Configuring done
-- Generating done
-- Build files have been written to: /home/markqiu/dev/RCF-2.0.0.2685/demo/cmake/bin
[ 25%] Building CXX object RcfLib/CMakeFiles/RcfLib.dir/home/markqiu/dev/RCF-2.0.0.2685/src/RCF/RCF.cpp.o
Linking CXX static library ../libRcfLib.a
[ 25%] Built target RcfLib
[ 50%] Building CXX object RcfDll/CMakeFiles/RcfDll.dir/home/markqiu/dev/RCF-2.0.0.2685/src/RCF/RCF.cpp.o
Linking CXX shared library ../libRcfDll.so
[ 50%] Built target RcfDll
Scanning dependencies of target Client
[ 75%] Building CXX object Client/CMakeFiles/Client.dir/home/markqiu/dev/RCF-2.0.0.2685/demo/Client.cpp.o
Linking CXX executable .
/usr/bin/ld: cannot open output file .: Is a directory
collect2: ld return 1
make[2]: *** [Client] error 1
make[1]: *** [Client/CMakeFiles/Client.dir/all] error 2
make: *** [all] error 2

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: any idea about the following error?

Post by jarl »

Thanks for reporting this. There is a problem when using cmake with the "Unix Makefiles" generator - the"Client" and "Server" targets are defined in folders of the same name, respectively, and this is throwing the linker for some reason.

To fix that I've renamed the Client and Server targets to DemoClient and DemoServer.

To do the same thing in your own copy, change the contents of demo\cmake\Client\CMakeLists.txt to this:

Code: Select all


ADD_DEFINITIONS( ${RCF_DEFINES} )

INCLUDE_DIRECTORIES( ${RCF_INCLUDES} )

ADD_EXECUTABLE(
    DemoClient
    ${RCF_ROOT}/demo/Client.cpp)

TARGET_LINK_LIBRARIES( DemoClient RcfLib ${RCF_LIBS} )
, and change the contents of demo\cmake\Server\CMakeLists.txt to this:

Code: Select all


ADD_DEFINITIONS( ${RCF_DEFINES} )

INCLUDE_DIRECTORIES( ${RCF_INCLUDES} )

ADD_EXECUTABLE(
    DemoServer
    ${RCF_ROOT}/demo/Server.cpp)

TARGET_LINK_LIBRARIES( DemoServer RcfLib ${RCF_LIBS} )

Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

markqiu
Posts: 18
Joined: Wed Sep 12, 2012 11:13 am

Re: any idea about the following error?

Post by markqiu »

Thank you. The problem is solved.

Post Reply