|
Thank you very much,You are very friendly,and helpful.
|
|
|
|
|
Hi Guys,
I am wondering if anyone can give me the scoop on this.
I am developing a dll file and I have some very good developers telling me that if I develop the dll in Visual Studio 2005/2008 in win32 unmanaged c++ that the dll will not work on win98/me and that it will be dependant on MSVCP80.DLL. They tell me that if I develop the dll in Visual Studio 6.0 that it will work on older operating systems like win98/me and it wont be dependant on MSVCP80.DLL.
Now is this true? and if so is there anyway that I can develop the dll using visual studio 2005/2008 so that it will still work on win98/me and NOT be dependant on MSVCP80.DLL?
Thanks,
Greg
|
|
|
|
|
The only way to develop using VS2005/8 and not be dependent on the C/C++ runtime library is to avoid any references to it.
How important is it to maintain support for Win98/ME?
|
|
|
|
|
Dependencies are inevitable.
That's why an installation package is created to distribute an application.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I believe you can statically link the C and C++ run-times into your DLL, so it won't try and load the VS2005/2008 DLLs when it's used.
If you do this, you need to take care with memory management of objects passed back from your DLL.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I need a c++ source code that will create a simple triangle in an x-y plane so that scaling, rotation and translational transformations can be carried out on it... any help before thurs, Please? thnx
|
|
|
|
|
On Windows using the Win32 API you can start looking at the SetWorldTransform[^] function.
Steve
|
|
|
|
|
I'm not sure what you're after.
To draw a triangle, you need a drawing surface, so if you're using MFC, you need a view class.
For your actual question, you just need to store 3 sets of X/Y coordinates however you like.
For a code sample, have a look at:
http://www.codeproject.com/KB/recipes/CoordWarp.aspx[^]
It's got lots of points making up long lines - but you can use just 3 if you like...
(Hint, Polygon, with n = 3)
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I'm developing a small app for WM5 and it is using FindFirstFile() and FindNextFile().
These work just great in the WM5 emulator in debug mode.
I created a CAB file and ran it on my Axim, but it didn't work correctly.
I left the state to Release, as opposed to Debug and ran it in the WM5 emulator, and got similar problems.
I think this is working differently for more then just these, but I'm not sure.
The code I am having problems with is looking for a specific file by pattern, and then looking to see if there are others that follow the same pattern; I'm looking for the newest dated version of the file that fills the pattern.
like \Windows\abc*.txt
it works great in debug mode on the emulator,
but not so on my Axim or in release mode on the emulator.
Does anyone know what is happening here?
|
|
|
|
|
OK. I figured this out.
It was a missing include file.
Kind of strange that Visual Studio in Debug mode would reconcile these without any warnings, and then just skip over these function calls when run in Release mode or on the device.
I don't know if there is some build setting to at least warn me about this; if anyone knows of a warning, let me know.
Thanks
|
|
|
|
|
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <unistd.h> // getcwd() definition
#include <sys/param.h> // MAXPATHLEN definition
using namespace std;
int main()
{
string database;
<snip>
cout << "Select full path of Database" << endl;
cin >> database;
</snip>
How do I check the existence of a file in C++?
In perl it would be something like:
if (!database){
print "No database found\n";
exit;
}
I tried looking online for hours but all the suggestions didnt work so far..
Thanks in advance!
|
|
|
|
|
do a seatch for PathFileExists.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
PathFileExists is a windows API and I am running C++ in linux so it doesnt work as far as I know and have been trying unless I goofed up...
|
|
|
|
|
I think you should be able to use _findfirst and _findnext on 'nix, I can't remember. They're in io.h
Or you could try to open the file and look at the function result....
|
|
|
|
|
After a lot of wrong examples from googling the web, I finally find something that works:
myFileName = file;
inp.open(myFileName.c_str(), ifstream::in);
inp.close();
if(inp.fail())
{
inp.clear(ios::failbit);
cout << "No File found " << myFileName.c_str() << endl;
exit(5);
}
else
{
cout << "Found File" << myFileName.c_str() << endl;
}
Thanks, hope this might help someone else...
Bye the way is this board only for Visual C++ or can someone working on Linux with C++ ask Qs?
|
|
|
|
|
meixiang6 wrote: Bye the way is this board only for Visual C++ or can someone working on Linux with C++ ask Qs?
We pretty much assume Visual C++ here, mostly even MFC is assumed to be used. Just in case you hadn't noticed the name of this board, it is MFC/C++.
You can ask C++ on Unix/Linux questions here, but you must let us know of it when posting your question.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
meixiang6 wrote: ...I am running C++ in linux...
It helps to mention this little requirement up front.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
meixiang6 wrote: How do I check the existence of a file in C++?
It's not C++, but you can use _access() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
The standard way of checking file existence on *nix (it works on Windows as well) is stat or fstat[^], I believe.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I will give it a try tommorrow...thanks!
|
|
|
|
|
You can also try in Windows,
if ( 0 == _access( database.c_str(), 0 ) ) {
cout<<"No database found.\n"
} and the nix equivelant is
if ( 0 == access( database.c_str(), 0 ) ) {
cout<<"No database found.\n"
}
|
|
|
|
|
Hi,
I have a requirement where I need to find out whether internet is available or not. How to achieve this using VC++?
THanks
Suhas
|
|
|
|
|
|
Supra2 wrote: How to achieve this using VC++?
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|