|
I have used VC++ 6.0 to developed a program. However, I found the EXE file can only run on a conputer with VC installed. However if no VC is installed on the computer, it will say "Cannot find ***.dll file", So currently what I did is to copy also the required DLL file from my PC to the target PC and place the DLL file into the same folder. It can work then...
However, I just feel it is not a neat way to solve the problem. Can anybody tell me some other better solution to build my program so as to make resultant EXE file work on PCs without VC installed also?
Thanks in Advance...
|
|
|
|
|
Yes, if you have a version higher than the standard one, you can choose to statically link to the MFC dll. Then you simply need to avoid the C run time, and you'll stand a good chance of being where you want to be, so long as you do not use Direct X, MDAC, GDI+, etc.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
|
If the program was compiled in Debug mode, it will require many VC debugging DLLs to run. If you compile the program in Release mode, it will not need those DLLs.
|
|
|
|
|
Hi,
I am using VC6.0++ with DAO & MS Access97! So far I use SQL successfully ... well except 1 thing:
I would like search a column (define as Boolean) in a databse table that has logic Checked (true?)
Whenever I did ... it does not worked!
1) strSQL.Format ("SELECT * FROM Sample WHERE Logic = 1");
2) strSQL.Format ("SELECT * FROM Sample WHERE Logic = TRUE");
3) strSQL.Format ("SELECT * FROM Sample WHERE Logic = %d", value); // set value = 1
*) Can anyone help me on this, I appreciate any help here
Many thanks,
Anh
|
|
|
|
|
Anonymous wrote:
Can anyone help me on this, I appreciate any help here
I just did something in Access XP and created a query that looks like this:
SELECT Table1.ID
FROM Table1
WHERE (((Table1.ID)=True));
There may be slight differences between 97 and XP in regards to the syntax, however I doubt this would be one of them. Hope this helps.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Hi,
I got help to find how it works, thanks for help! Please see the the second Post of RedZenBird
Thanks,
|
|
|
|
|
did you try Yes/No ? Not sure if it'll work, but I just used Access to define a test table, and it called the column type a yes/no column.....maybe that's a valuable hint. If that doesn't work...then I don't know
Just trying to keep the forces of entropy at bay
|
|
|
|
|
Hi,
I got help to find how it works, thanks for help! Please see the the second Post of RedZenBird
Thanks,
|
|
|
|
|
I've confirmed that Yes / No works. Also True / False .... Seems maybe its case sensitive (?)
Just trying to keep the forces of entropy at bay
|
|
|
|
|
Hi RedZenBird,
Thank you very much for your help, it works great!
Many thanks,
Anh
|
|
|
|
|
Hi RedZenBird,
Thank you very much for your help, it works great!
Many thanks,
Anh
|
|
|
|
|
I've worked with both Access and SQL Server SQL statements and found a little inconsistency in the way that both platform represents a boolean value!
However I've found that FALSE is always represented as 0 (zero), and TRUE as any non-zero value. Access will sometimes store TRUE as -1.
So to query a boolean field I use :
"SELECT * FROM [Sample] WHERE [Logic]=0" // FALSE
"SELECT * FROM [Sample] WHERE [Logic]<>0" // TRUE
|
|
|
|
|
Hi,
I got help to find how it works, thanks for help! Please see the second Post of RedZenBird
Thanks,
|
|
|
|
|
My teacher says there isn't but...
There's got to be a better way to do this...
Organism aOrgArray[iColSize] = {Organism iNumChroms),Organism (iNumChroms),
Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),
Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),
Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),
Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),Organism (iNumChroms),
Organism (iNumChroms),Organism (iNumChroms)};
iColSize = 20 for this prog
The constructor for class Organism takes an integer argument, iNumChroms, that has no default value. A default would be acceptable if it would help me clean up this ugly delcaration! What if it needed to be 1000!?
|
|
|
|
|
You've answered your own question. Provide a default constructor, and a method to set the number of Chromosomes. Then you can set them in a loop, no matter how many there are.
Or create them on the heap. Then you can call new on them in a loop and pass in your variable.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I suppose you could do something like:
int i;
Organism aOrgArray[iColSize];
for(i = 0; i < iColSize - 1; i++)
aOrgArray[i] = Organism(iNumChroms);
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Um...
Nick Parker wrote:
int i;
Why create this first, and why create it without initialising it ?
Nick Parker wrote:
Organism aOrgArray[iColSize];
Won't work, unless you mean the col size to be a constant that replaces this variable, which does not really exist
Nick Parker wrote:
for(i = 0; i < iColSize - 1; i++)
Even if the rest would work, this would leave the last item uninitialised.
Nick Parker wrote:
aOrgArray[i] = Organism(iNumChroms);
Won't work, the item already exists, except it doesn't, because no default constructor is available.
All of this would be possible if you created them on the heap, an array of Organism pointers, and aOrgArray[i] = new Organism(iNumChroms);.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
Nick Parker wrote:
int i;
Why create this first, and why create it without initialising it ?
I'm betting he's a C programmer who's never got used to this new fangled ability to declare variables anywhere you like (though I tend to prefer to declare all of my variables at the top, anyway, as it makes it much easier to see what the function's using)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I have to admit that conversely, when I had to start using straight C for Palm work, I had NO idea why my code would not compile when it was scattered with variable declarations.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Sheesh, I need to be careful when answering questions late at night and not fully qualifying what I meant.
Christian Graus wrote:
Why create this first, and why create it without initialising it ?
True, I could have just done for(int i = 0;.....
Christian Graus wrote:
Won't work, unless you mean the col size to be a constant that replaces this variable, which does not really exist
I was assuming this would be a constant.
Christian Graus wrote:
Even if the rest would work, this would leave the last item uninitialised.
Yeah, yeah, I was typing quick and the moon was out and .... you want more of an excuse?
Christian Graus wrote:
Won't work, the item already exists, except it doesn't, because no default constructor is available.
I was also assuming that he would add a default constructor as I believe you mentioned it in the above post.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Nick Parker wrote:
I was assuming this would be a constant.
Fair enough. It was not clear to me.
Nick Parker wrote:
I was also assuming that he would add a default constructor as I believe you mentioned it in the above post.
That was not clear to me, either.
Nick Parker wrote:
you want more of an excuse?
Not good enough mister !! Oh wait, it seems the latest reports indicate I am not perfect, either. Damn.......
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
Not good enough mister !! Oh wait, it seems the latest reports indicate I am not perfect, either. Damn.......
Wow, there is a report for these types of things? Is it automated? Where can I find this at?
Christian Graus wrote:
I am not perfect, either
Shh...we can keep it a secret and continue to fool them.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Damn Christain, calm down.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks for your help guys..it seems so obvious now..
|
|
|
|
|