beginner question about boost Unit test framework

I am using Boost 1.31 with VC 6.0. I am testing the simplest example
provided in the boost document. It seems "boost::unit_test" is not a valid
namespace. After I change it to "boost::unit_test_framwork", it can compile
but can not link, the error I got is "LINK : fatal error LNK1561: entry
point must be defined".
The exmaple I used:
#include

J Liu writes:
I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
IIRC there were significant changes to the unit test framework between V1.31 and V1.32, and the document you're looking at almost certainly describes 1.32. Try upgrading Boost and see what happens. (The 1.32 version of the unit test framework was actually a big influence on our decision to officially move our code base from using 1.31 to 1.32.) ---------------------------------------------------------------------- Dave Steffen, Ph.D. "There are two ways to write error-free Software Engineer IV programs; only the third one works." Numerica Corporation ph (970) 419-8343 x27 "Pie are not square. Pie are round. fax (970) 223-6797 Cornbread are square" dgsteffen@numerica.us ... anon (usenet) ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.

I am using VC6.0 so I can not use boost1.32.
I tried the boost1.31 example, I got the same link error.
Below is the command I used for linking...
cl /nologo /EHsc- /Zi /Yd /Od /MDd /Zm200
/FD -D_DEBUG_MEMORY -I. -I.\include -IC:\dev\head\server\boost_
1_31_0 /Fe..\bin\test_cmdparse.exe test_cmdparse.obj -link
C:\dev\head\server\boost_1_31_0\stage\lib\libboost_test_exec_monitor-vc6-m
t-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_unit_test_framework-vc6-mt-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_prg_exec_monitor-vc6-mt-gd-1_31.lib
From: "Dave Steffen"
J Liu writes:
I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
IIRC there were significant changes to the unit test framework between V1.31 and V1.32, and the document you're looking at almost certainly describes 1.32. Try upgrading Boost and see what happens.
(The 1.32 version of the unit test framework was actually a big influence on our decision to officially move our code base from using 1.31 to 1.32.)
---------------------------------------------------------------------- Dave Steffen, Ph.D. "There are two ways to write error-free Software Engineer IV programs; only the third one works." Numerica Corporation ph (970) 419-8343 x27 "Pie are not square. Pie are round. fax (970) 223-6797 Cornbread are square" dgsteffen@numerica.us ... anon (usenet) ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.

I had a similar problem because I accidentally tried to build a GUI program instead of a console program. When I used the linker flag "/subsystem:console" it fixed the problem. Jason At 05:52 PM 7/19/2005, you wrote:
I am using VC6.0 so I can not use boost1.32. I tried the boost1.31 example, I got the same link error.
Below is the command I used for linking...
cl /nologo /EHsc- /Zi /Yd /Od /MDd /Zm200 /FD -D_DEBUG_MEMORY -I. -I.\include -IC:\dev\head\server\boost_ 1_31_0 /Fe..\bin\test_cmdparse.exe test_cmdparse.obj -link C:\dev\head\server\boost_1_31_0\stage\lib\libboost_test_exec_monitor-vc6-m t-gd-1_31.lib C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_unit_test_framework-vc6-mt-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_prg_exec_monitor-vc6-mt-gd-1_31.lib
From: "Dave Steffen"
J Liu writes:
I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
IIRC there were significant changes to the unit test framework between V1.31 and V1.32, and the document you're looking at almost certainly describes 1.32. Try upgrading Boost and see what happens.
(The 1.32 version of the unit test framework was actually a big influence on our decision to officially move our code base from using 1.31 to 1.32.)
---------------------------------------------------------------------- Dave Steffen, Ph.D. "There are two ways to write error-free Software Engineer IV programs; only the third one works." Numerica Corporation ph (970) 419-8343 x27 "Pie are not square. Pie are round. fax (970) 223-6797 Cornbread are square" dgsteffen@numerica.us ... anon (usenet) ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

YEAH! This works.
Thanks a lot.
"Jason Stewart"
I had a similar problem because I accidentally tried to build a GUI program instead of a console program. When I used the linker flag "/subsystem:console" it fixed the problem.
Jason
At 05:52 PM 7/19/2005, you wrote:
I am using VC6.0 so I can not use boost1.32. I tried the boost1.31 example, I got the same link error.
Below is the command I used for linking...
cl /nologo /EHsc- /Zi /Yd /Od /MDd /Zm200 /FD -D_DEBUG_MEMORY -I. -I.\include -IC:\dev\head\server\boost_ 1_31_0 /Fe..\bin\test_cmdparse.exe test_cmdparse.obj -link C:\dev\head\server\boost_1_31_0\stage\lib\libboost_test_exec_monitor-vc6-m t-gd-1_31.lib C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_unit_test_framework-vc6-mt-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_prg_exec_monitor-vc6-mt-gd-1_31.lib
From: "Dave Steffen"
J Liu writes:
I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
IIRC there were significant changes to the unit test framework between V1.31 and V1.32, and the document you're looking at almost certainly describes 1.32. Try upgrading Boost and see what happens.
(The 1.32 version of the unit test framework was actually a big influence on our decision to officially move our code base from using 1.31 to 1.32.)
---------------------------------------------------------------------- Dave Steffen, Ph.D. "There are two ways to write error-free Software Engineer IV programs; only the third one works." Numerica Corporation ph (970) 419-8343 x27 "Pie are not square. Pie are round. fax (970) 223-6797 Cornbread are square" dgsteffen@numerica.us ... anon (usenet) ___________________ Numerica Disclaimer: This message and any attachments are intended only for the individual or entity to which the message is addressed. It is proprietary and may contain privileged information. If you are neither the intended recipient nor the agent responsible for delivering the message to the intended recipient, you are hereby notified that any review, retransmission, dissemination, or taking of any action in reliance upon, the information in this communication is strictly prohibited, and may be unlawful. If you feel you have received this communication in error, please notify us immediately by returning this Email to the sender and deleting it from your computer.
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

I'm sorry about quoting all of that last message. I hit send before I thought. Jason

I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid
boost::unit_test is started to be used in 1.32
namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
What are you trying to link? What kind of project? Could you list of your libs and sources? Gennadiy

boost::unit_test is started to be used in 1.32 But I found it in 1.31 and there are some examples. I can not run anyone of
Below is the command I used for linking...
cl /nologo /EHsc- /Zi /Yd /Od /MDd /Zm200
/FD -D_DEBUG_MEMORY -I. -I.\include -IC:\dev\head\server\boost_
1_31_0 /Fe..\bin\test_cmdparse.exe test_cmdparse.obj -link
C:\dev\head\server\boost_1_31_0\stage\lib\libboost_test_exec_monitor-vc6-m
t-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_unit_test_framework-vc6-mt-gd-1_31.lib
C:\dev\head\yukon-server\boost_1_31_0\stage\lib\libboost_prg_exec_monitor-vc6-mt-gd-1_31.lib
LINK : fatal error LNK1561: entry point must be defined
"Gennadiy Rozental"

boost::unit_test is started to be used in 1.32 But I found it in 1.31 and there are some examples. I can not run anyone of them
I think you are mistaken. The cause for your problem could be that you have both 1.31 and 1.32 installed and you are compiling pointing to 1.32 while linking with libs build with 1.32 or vice versa. Gennadiy

I think my problem is how to use the boost test .lib to link the test
program.
I tried to put
#include
I am using Boost 1.31 with VC 6.0. I am testing the simplest example provided in the boost document. It seems "boost::unit_test" is not a valid namespace. After I change it to "boost::unit_test_framwork", it can compile but can not link, the error I got is "LINK : fatal error LNK1561: entry point must be defined".
The exmaple I used:
#include
using namespace boost::unit_test; test_suite* init_unit_test_suite( int argc, char* argv[] ) { test_suite* test= BOOST_TEST_SUITE( "const_string test" ); return test; }
Thanks for any help
participants (4)
-
Dave Steffen
-
Gennadiy Rozental
-
J Liu
-
Jason Stewart