[Cmake] CMAKE for Borland C++ Builder/Win32: linker flag

Bill Hoffman bill.hoffman at kitware.com
Mon Oct 21 13:43:07 EDT 2002


With Borland 5, it does not seem that   -tWM implies -tWC.
But, i have not built any non-console apps with borland, as I
only have the command line tools.   I will try adding the  -tW option
and see what happens.    If this works for Borland 5, then it should
make it into the next pathch for cmake.

Thanks for the report.

-Bill


At 11:11 AM 10/14/2002 +0200, Stefan Kowski wrote:
>Hi,
>
>I just tried to compile a Borland C++ Builder 4 GUI application with CMAKE.
>The link failed because of an unresolved external '_main', referenced by
>C0X32.OBJ. This is because of an invalid command line option in the Borland
>Makefile generated by CMAKE.
>
>The CMakeList.txt file:
>
>        PROJECT (CMAKETEST)
>
>        ADD_DEFINITIONS(-D_RTLDLL -DUSEPACKAGES)
>
>        SET(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -L..")
>
>        LINK_LIBRARIES(vcl40 cw32mt)
>
>        SET(CMAKETEST_SRCS Project1.cpp Unit1.cpp)
>
>        ADD_EXECUTABLE(CMakeTest WIN32 ${CMAKETEST_SRCS})
>
>In the CMAKE source file I found (cmake 1.4.5, class
>cmBorlandMakefileGenerator, function OutputExecutableRule):
>
>        if(t.GetType() == cmTarget::WIN32_EXECUTABLE)
>        {
>                command +=  " -tWM ";           => multithreaded console application
>(implies -tWC!)
>        }
>
>This should be changed to:
>
>        if(t.GetType() == cmTarget::WIN32_EXECUTABLE)
>        {
>                command +=  " -tW -tWM ";       => multithreaded Windows application
>        }
>
>I would be glad if this correction can be added to the source code.
>
>Note: I do not know if this switch '-tW' is working with Builder versions
>5.x/6.x, maybe someone can test this.
>
>Stefan
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 





More information about the CMake mailing list