|
|
Home » Developing U++ » U++ Developers corner » [Tutorial] Using the Visual Studio IDE with U++
[Tutorial] Using the Visual Studio IDE with U++ [message #37554] |
Wed, 17 October 2012 11:25  |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
Hi there, I have been using U++ now for a few weeks. I like the library and the way of programming. However, there is one thing that I find very annoying. The packaged IDE "TheIDE". It lacks debugging features in my opinion and does not sufficiently supports me in my work with intellisense and auto-completion.
After two hours I managed to get my whole U++ application including libraries into Visual Studio 2012. It compiles, runs and now debugging is much easier to do. This topic is meant to explain to the community what I did, in case of any others having the same opinion as I have or just want to use the Visual Studio IDE anyway.
I use Visual Studio 2012, but this will probably work with 2010 and 2008 too. I'm not sure about 2005.
1. First you have to open TheIDE and compile every U++ package that you want to use in Debug mode. Make sure you have TheIDE configured with the compiler of the Visual Studio version you want to use!
2. Create a new folder somewhere where you can find it and place every output .lib file in there. With these files I mean Core.lib, CtrlLib.lib, etc.
3. Open up Visual Studio and create a new C++ Win32 project. Make it an empty project.
4. Open up the properties of the project by right-clicking on the project and clicking Properties.
5. Go to C/C++ and add the <upp directory>\uppsrc\ to the list of Additional Include Directories
6. Go to Code Generation and set Runtime Library to Multi-Threaded Debug (/MTd). Do not set it to MDD! This will generate errors.
7. Go to Linker and click General. Click Additional Library Directories to open up the list. Add the folder where you placed the compiled U++ lib files from step 2 to the list and click OK.
8. Go to Linker and click Input. Click Additional Dependencies to open up the list. Add the following libraries to the list:
- Winmm.lib
- Mpr.lib
- CtrlLib.lib
- Core.lib
- CtrlCore.lib
- bmp.lib
- png.lib
- z.lib
- Draw.lib
- RichText.lib
These libraries ofcourse are the ones my application needed. You also need to link a few Win32 libraries because the U++ libs need these.
9. Rename every .icpp file that does not compile in your project to .cpp.
10. If you are using .iml image files you need to change the include from:
#include <Folder/imlfile.iml>
to:
Try and compile your project. It should work as it did for me. There is one problem that I got by. However, if you want to use Visual Studio only for debugging this should not be a big problem. When you run your program from Visual Studio the GUI is not drawn properly. Buttons are black, borders are missing and arrayctrl headers are not drawn properly. If there are any other problems please report them.
[Updated on: Thu, 18 October 2012 11:02] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: [Tutorial] Using the Visual Studio IDE with U++ [message #37570 is a reply to message #37567] |
Fri, 19 October 2012 10:54   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
ofcorse it just makes sense to use ide to dev upp.
to include upp packages in own existing eclipse development would show the versatility of upp in a great way..
* use is as a self contained dependency free framework, building and debuggin in own the ide space
* extend your capabilities by binding your existing (VS or eclipse or wahtever) projects with upp packages.. (providing only very small glue logic / wrapper classes if at all).
* develop entirely in another IDE, but benefit from everything upp offers as source base.
since eclipse is my current dvelopment environment at work i will be persuing it slowly but steadily..
EDIT: maybe i can use doliks universal makefile generation for the purpose of eclipse building.. as a prebuild step or sth..
[Updated on: Fri, 19 October 2012 11:37] Report message to a moderator
|
|
|
Re: [Tutorial] Using the Visual Studio IDE with U++ [message #37572 is a reply to message #37570] |
Fri, 19 October 2012 12:20   |
|
kohait00 wrote on Fri, 19 October 2012 10:54 | EDIT: maybe i can use doliks universal makefile generation for the purpose of eclipse building.. as a prebuild step or sth..
|
Note that the Makefile is now generated by UppBuilder package, which allows to easily write specialized tools based on the same parser of U++ files. So if you need some special handling for eclipse plugin or something, it can probably be done rather easily 
Honza
[Updated on: Fri, 19 October 2012 12:21] Report message to a moderator
|
|
|
Re: [Tutorial] Using the Visual Studio IDE with U++ [message #38442 is a reply to message #37554] |
Sat, 15 December 2012 19:11   |
lectus
Messages: 329 Registered: September 2006 Location: Brazil
|
Senior Member |
|
|
Honestly I prefer to use TheIde.
Having only one IDE running on all OSes U++ supports is great. And TheIde has all features I need.
Yes, it's a good effort to compile U++ on Visual Studio, but I'd rather open a package in TheIde and it builds without any path fiddling because everyone is using TheIde too.
AFAIK that's one of the problems with wxWidgets. It has too many IDEs and GUI editors but no official one.
[Updated on: Sat, 15 December 2012 19:12] Report message to a moderator
|
|
|
|
Re: [Tutorial] Using the Visual Studio IDE with U++ [message #40883 is a reply to message #40881] |
Mon, 30 September 2013 06:17   |
|
crydev wrote on Sun, 29 September 2013 23:06 | To link the object files properly in Visual Studio, set TheIDE to be verbose, copy the link command in notepad and filter out all the .obj files that are not included in your own package. Copy all of these strings to 'Additional command lines options' in Visual Studio. If all went well it should work now.
|
Could this be automated? It seems like annoyance to manually set this up for each project, especially if it requires running TheIDE...
I'm not using Visual Studio (not even windows), but I support all attempts to make U++ work without TheIDE. To be able to use it with only a makefile, I created minimalistic .upp parser. It is written in such way that it allows adding multiple backends for various purposes, so it could perhaps be used also to automate the build process in VS. You can find the source in the svn repository. It is partialy documented, but if you have trouble understanding something, I can help. I'd try to do this myself, but I just don't have the platform to test it on. So you'll have to figure out how to make it work with VS, and I can help you generate the proper command lines 
Best regards,
Honza
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:57:06 CEST 2025
Total time taken to generate the page: 0.04068 seconds
|
|
|