Home » Community » Newbie corner » MSVC 10 to Upp conversion
MSVC 10 to Upp conversion [message #32638] |
Mon, 30 May 2011 22:22  |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
I am trying to convert a command line app I got working in MSVC 10 into Upp. Then I will make a GUI for it.
It was originally written for Linux in 2005 and a patch for Windows a year or so later. It has not been maintained since then AFAIK.
After making a package in MyApps with the code, making a .cpp file and getting the linking taken of (so far) there were
many warnings regarding deprecation (I think that can be handled).
There were several errors.
I did a search and replace for strcasecmp to strcmp, I can handle the case later.
Here are the remaining errors and the code:
C:\MyApps\GUItiler\tilepack.cpp(61) : error C2065: 'DIR' : undeclared identifier
C:\MyApps\GUItiler\tilepack.cpp(61) : error C2065: 'd' : undeclared identifier
C:\MyApps\GUItiler\tilepack.cpp(66) : error C2065: 'd' : undeclared identifier
C:\MyApps\GUItiler\tilepack.cpp(66) : error C3861: 'opendir': identifier not found
C:\MyApps\GUItiler\tilepack.cpp(67) : error C2065: 'd' : undeclared identifier
C:\MyApps\GUItiler\tilepack.cpp(68) : error C2065: 'd' : undeclared identifier
C:\MyApps\GUItiler\tilepack.cpp(68) : error C3861: 'readdir': identifier not found
C:\MyApps\GUItiler\tilepack.cpp(68) : fatal error C1903: unable to recover from previous error(s); st
opping compilation
// code that throws the errors
void ScanDatasetR(const char *path) {
DIR *d;
struct dirent *de;
int l, x, y;
string s;
d = opendir(path);
if (!d) return;
while (de = readdir(d)) {
if ((de->d_type == DT_DIR) && (de->d_name[0] != '.')) ScanDatasetR((string(path) + string(de->d_name) + "/").c_str());
if (de->d_type == DT_REG) {
s = de->d_name;
if (sscanf(s.substr(0, 2).c_str(), "%x", &l) && sscanf(s.substr(2, 8).c_str(), "%x", &x) && sscanf(s.substr(10, 8).c_str(), "%x", &y)) {
bm[(static_cast<unsigned __int64>(l) << 50) + (static_cast<unsigned __int64>(y >> 7) << 25) + (x >> 7)].push_back((x & 0x7f) + ((y & 0x7f) << 7));
}
}
}
closedir(d);
}
I am not that proficient with pointers so help would be appreciated.
With the " unable to recover from previous error(s); stopping compilation" there will probably be more later but just taking it a step at a time.
edit: I don't want to use MSVC for the GUI or anything else if it can be avoided.
I like Upp.
[Updated on: Mon, 30 May 2011 22:43] Report message to a moderator
|
|
|
 |
|
MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Mon, 30 May 2011 22:54
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Tue, 31 May 2011 08:40
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Tue, 31 May 2011 21:20
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Wed, 01 June 2011 08:06
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Wed, 01 June 2011 12:09
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Wed, 01 June 2011 17:19
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Thu, 02 June 2011 08:36
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Thu, 02 June 2011 11:37
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Thu, 02 June 2011 13:53
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Sun, 05 June 2011 06:58
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Tue, 07 June 2011 07:17
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Tue, 07 June 2011 15:59
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
|
 |
|
Re: MSVC 10 to Upp conversion
By: koldo on Tue, 14 June 2011 09:17
|
 |
|
Re: MSVC 10 to Upp conversion
|
Goto Forum:
Current Time: Mon May 12 14:22:30 CEST 2025
Total time taken to generate the page: 0.03431 seconds
|