|
|
No, the way it is done generally is that the same code is compiled with two different compilers: one for windows (and it produces a .lib file) and one for linux (it produces an .a file if I remember correctly). You cannot use the same library under windows and linux, because a library contains object code which is not portable.
|
|
|
|
|
Thanks for the quick reply Cédric. [ ]
|
|
|
|
|
You're welcome.
BTW, if you want to compile both for windows and linux (the way I described in my first answer), your code shouldn't use any platform dependant API (like MFC or WIN32 API). But cross-platform solutions exist, like for example ACE (as already said by Naveen) or wxWidgets[^] (something very similar to MFC but cross-platform).
|
|
|
|
|
Yes Cedric, I have taken care not to include any platform dependent code inside the code. Now I just need to build and link the code to diffenent runtimes on respective platforms.
|
|
|
|
|
i want to paste an icon as like inserting breakpoints in vc++.i tried bitmapbutton,pasteicon in static but nothing is efficient..infact if i give a cmd it should remove that icon also..
|
|
|
|
|
What do you mean by "paste"? Draw it on a window?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
any idea on how can the normally blue color of title bars can be changed.
|
|
|
|
|
Use SetSysColors() with COLOR_GRADIENTACTIVECAPTION and COLOR_ACTIVECAPTION .
|
|
|
|
|
Won't the use of SetSysColor() set the color of the title bars across the OS? If affirmative, this doesn't seem to be a good idea.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
How Can I Access And Read Data From Sound Card With Line In Port In Visual C++?
|
|
|
|
|
By Using Direct Show. Search The Site For Articles On How To Do This.
Man, that stuff is hard on the eyes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Man, that stuff is hard on the eyes.
You reminded me of an interesting read I bookmarked a while back about word recognition and eye tracking...
The Science of Word Recognition[^]
|
|
|
|
|
Christian Graus wrote: Man, that stuff is hard on the eyes.
It's hard on one's mental health as well!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
Hi:
I have a variable of "map" type, which is defined as map<string, vector=""> table;.
How can I assign values to this table?
Normally, if "table" is defined as map<string, int="">.
We will simply:
this->table.insert(make_pair(string newString, int newInt));<br />
But this time, vector<> is not a simple variable but a complex one.
Any help is appreciated.
Thank you
|
|
|
|
|
Well, for starters, the vector needs it's own template arguements. Actually, for starters, you should check "Ignore HTML tags in this message (good for code snippets)", I had to view source to understand the question.
I always add to a map using table["string"] = 5; But, I'd imagine the purpose of a map to a vector is that you'd do this:
table["myKey"].push_back(myinstanceofwhatevertypethevectorholds);
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: myinstanceofwhatevertypethevectorholds
That's a nice variable name
|
|
|
|
|
I have a Piece of code that should only be able to run in one instance on each (LAN)networked computer. Idealy it should behave like Task Manager. i.e.: If one tries to start a second instance, control is transferred to the running instance. Anyone any idea how to do that?
LateNightsInNewry
|
|
|
|
|
This[^] article may help.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks Mark,
Very Helpfull, Much Appreciated, Will email you a Bottle of Wine
LateNightsInNewry
|
|
|
|
|
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Guys,
Please excuse this dumb question, but I am new to programming in Visual C++ 6.0 and I would like to know how to do the following. I have an array of bytes that it is provided by a Library (myLib.lib). This has a collection of functions that fetch an image from a camera, and provide me the pointer for the 1D array of RGB bytes of an image.
I am writing the application in Visual Basic 6.0 SP6. I want send a command via DLL to a VC++ generated DLL where:
1. when the function receives a command, the function displays a Dialog box
2. The dialog box has a picturebox and paints the array.
3. I saw visual C++ has all the gdi32.lib where Setbitmapbits() is included. However, I thought it was just as simple as using the function but apparently VC has quite a bit things to do in order to use the gdi32.dll or gdi32.lib
I have some experience writing C++ DLL libraries for Visual Basic using _stdcall type of functions. I figure I have to use an RC resource and I know simple Dialogs are available. The questions is how do I make that dialog show up when I call it from VB?
Does anyone know? Any help will be greatly appreciated by those of you who know C++ well. I know VB6 well, so if I can help send me your questions.
Regards,
rjrodrig@yahoo.com
VB on Steroids by VC++
|
|
|
|
|
rjrodrig wrote: how do I make that dialog show up when I call it from VB?
You will probably get a better answer if you ask this in the VB Forum.
|
|
|
|