how to create Win32 project

177 views
Skip to first unread message

Xiaowen

unread,
Sep 11, 2012, 5:33:58 AM9/11/12
to win...@googlegroups.com
Hello Daniel,
 
I am now trying  to create the  ros package on windows with the msvc compiler and the sdk, but I did not find detailed tutorials about how to build new package. I followed  the steps in the webite http://www.ros.org/wiki/win_ros/Msvc%20SDK%20Projects%20-%20Electric, but can not understand that, especially about the point how to make project settings.
 
And I wonder if I can use qt to run the pacakge.
 
Xiaowen

Daniel Stonier

unread,
Sep 11, 2012, 6:48:21 AM9/11/12
to win...@googlegroups.com

I dont have support in yet for qt+msvc. Its on the todo though.

Until now Ive always built win32 qtros apps in linux using the mingw cross compiler.

Cheers,
Daniel

Daniel Stonier

unread,
Sep 11, 2012, 7:06:16 AM9/11/12
to win...@googlegroups.com

Ah. Xiaowen.

Just remembered you from your earlier posts. I suspect it will be hard to get qt integration working. The msvc electric is also very limited.

You might be able to get things working if you can successfully get each qt project's cmake using find_package(qt) correctly and doing the cmake magic properly. Not trivial though.

Daniel.

On Sep 11, 2012 6:33 PM, "Xiaowen" <sun...@gmail.com> wrote:

Dominique Vaufreydaz

unread,
Sep 11, 2012, 7:11:32 AM9/11/12
to win...@googlegroups.com
Hello,

> I am now trying to create the ros package on windows with the msvc compiler and the sdk, but I did not find detailed tutorials
> about how to build new package. I followed the steps in the webite
> http://www.ros.org/wiki/win_ros/Msvc%20SDK%20Projects%20-%20Electric, but can not understand that, especially about the point how
> to make project settings.

The page about Fuerte (current version) is almost working for making msvc doing it. Some
usual tricks about Environment variables.

Best regards. Doms.

PS: try it again.

Dominique Vaufreydaz

unread,
Sep 11, 2012, 7:16:31 AM9/11/12
to win...@googlegroups.com
This PS was for me as first attempt to send email to the list failed.

Doms

Xiaowen

unread,
Sep 11, 2012, 7:48:08 AM9/11/12
to win...@googlegroups.com
Yes, it's me.
At last attemp on Linux, I could use qt.
At this time, I put debug and release directories under new package, and rewrite setup.bat, then combined qt with visual studio. After that, I run setup.bat in cmd, then run "qmake -project" to generate .pro file, so that the project could be opened in msvc-qt. However, once I run the project on visual-studio-qt, the Output window showed:

1>------ Build started: Project: TimeStamp, Configuration: Debug Win32 ------

1>Build started 2012/9/11 13:39:27.

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(298,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.

1>InitializeBuildStatus:

1> Creating "Win32\Debug\TimeStamp.unsuccessfulbuild" because "AlwaysCreate" was specified.

1>ComputeCustomBuildOutput:

1> Creating directory "C:\work\TimeStamp\GeneratedFiles\".

1>CustomBuild:

1> Moc'ing client_mainwindow.h...

1> Moc'ing server_mainwindow.h...

1> Uic'ing src\Client\client_mainwindow.ui...

1> Uic'ing src\Server\server_mainwindow.ui...

1>ClCompile:

1> moc_client_mainwindow.cpp

1>c:\work\timestamp\debug\../src/Client/client_mainwindow.h(5): fatal error C1083: Cannot open include file: 'TimeStamp/Time_Stamp.h': No such file or directory

1> moc_server_mainwindow.cpp

1>c:\work\timestamp\debug\../src/Server/server_mainwindow.h(5): fatal error C1083: Cannot open include file: 'TimeStamp/Time_Stamp.h': No such file or directory

1> CMakeCXXCompilerId.cpp

1> callback_queue.cpp

1>debug\python\libros\callback_queue.cpp(35): fatal error C1083: Cannot open include file: 'ros/callback_queue.h': No such file or directory

1> callback_queue.cpp

...

...

1> xmlrpc_manager.cpp

1>debug\python\libros\xmlrpc_manager.cpp(28): fatal error C1083: Cannot open include file: 'ros/xmlrpc_manager.h': No such file or directory

1> Generating Code...

1> Compiling...

1> xmlrpc_manager.cpp

1>release\python\libros\xmlrpc_manager.cpp(28): fatal error C1083: Cannot open include file: 'ros/xmlrpc_manager.h': No such file or directory

1> Generating Code...

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:57.64

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 Maybe it's  not possible  to use qt so far.
 
Xiaowen

Xiaowen

unread,
Sep 11, 2012, 7:54:51 AM9/11/12
to win...@googlegroups.com
Hi Doms,
 
Thanks for your reply.
I am using electric version now. If it is possible to use electric?
So if I just want to create an ordinary ros-pkg with msvc compiler without combining with qt. What should I do? Creating the project on visual studio, and write the code, then add manifest.xml , Makefile , CMakeLists.txt into the pkg?
 
rgds,
Xiaowen

Daniel Stonier

unread,
Sep 11, 2012, 8:54:41 AM9/11/12
to win...@googlegroups.com
On 11 September 2012 20:54, Xiaowen <sun...@gmail.com> wrote:
Hi Doms,
 
Thanks for your reply.
I am using electric version now. If it is possible to use electric?
So if I just want to create an ordinary ros-pkg with msvc compiler without combining with qt. What should I do? Creating the project on visual studio, and write the code, then add manifest.xml , Makefile , CMakeLists.txt into the pkg?
 
rgds,
Xiaowen


You can just create standalone visual studio projects (not ros packages like you did for mingw qt) which set include and library directories to wherever your sdk is installed. I imagine you can do this very similarly with qt in windows.

Doing it ros style with CMakeLists.txt and manifest.xml's is currently much more complicated - don't have the wizard tools yet (though they're coming, I've got a pypi roscreate-xxx package built, just not compiled for windows yet). I wouldn't honestly learn how to do that for electric either, because it changed greatly in fuerte and you'd end up throwing away the invested effort.

There are only two reasons you'd want to do it ros style. 1) if you wanted to create comms (.msg, .srv, .action) packages of your own or 2) you want to create alot of modular tools and libraries that can be easily managed together.

Daniel.

PS Do let us know how you got there if you get it working Dom.
 
On Tuesday, 11 September 2012 13:11:38 UTC+2, Doms wrote:
Hello,

 > I am now trying  to create the  ros package on windows with the msvc compiler and the sdk, but I did not find detailed tutorials
 > about how to build new package. I followed  the steps in the webite
 > http://www.ros.org/wiki/win_ros/Msvc%20SDK%20Projects%20-%20Electric, but can not understand that, especially about the point how
 > to make project settings.

     The page about Fuerte (current version) is almost working for making msvc doing it. Some
        usual tricks about Environment variables.

     Best regards. Doms.

        PS: try it again.



--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/

Dominique Vaufreydaz

unread,
Sep 11, 2012, 9:28:52 AM9/11/12
to win...@googlegroups.com
Hello,

> PS Do let us know how you got there if you get it working Dom.

My answer was limited, just ansering about project settings in MSVC to compile ROS program.
I miss the package part of the message (diagonal read, sorry).

I currently try to check everything in winros, to know on what I can contribute.

Best regards. Doms.

Xiaowen

unread,
Sep 11, 2012, 9:51:44 AM9/11/12
to win...@googlegroups.com

Xiaowen

unread,
Sep 11, 2012, 11:50:32 AM9/11/12
to win...@googlegroups.com
Solved the msg problem, just by adding the directory msg_gen\cpp\include\TimeStamp into "C++->General->Additional Include Directories",  then the TimeStamp.h could be found(which is generated in linux qt). But two error showep up: 

fatal error C1083: Cannot open include file: 'rospack/rospack.h': No such file or directory

error C1083: Cannot open include file: 'config.h': No such file or directory C:\work\TimeStamp\debug\python\libros\network.cpp 28

And I have read from the schebang.bat that:


REM Rospack is just experimental, avoid for now

REM (not necessary for simple execution)

So I can not use rospack now? Do you have any idea?

Kind regards,
Xiaowen
Reply all
Reply to author
Forward
0 new messages