Author Topic: [C++] Converting FreeBASIC Pointer Types into a Class  (Read 43428 times)

0 Members and 1 Guest are viewing this topic.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #60 on: August 26, 2009 »
@All: thank you so much.

@Jim: it might be to do with the the tiny ptc lib. my files havent really changed except for the addition of sin and the <maths.h>
http://www.dbfinteractive.com/forum/index.php?action=dlattach;topic=4329.0;attach=5098
if you really need the source with the sin in, I'll zip that up for ya.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #61 on: August 26, 2009 »
The problem is probably in your project settings file (the .vcproj file) which you haven't posted.

Adding to what Hellfire says:

10 is an int
10.0 is a double
10.0f is a float (i.e. put an f at the end to make constant floats).

Jim
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #62 on: August 27, 2009 »
Cool! :)

Here's my vc project file.

Cheers,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #63 on: August 27, 2009 »
That project file is for whatever demo you are working on, not what we are working on here.  If I put in our source code there is no warning.

Jim
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #64 on: August 29, 2009 »
You must have something set that I dont, as everytime I use:

float a_float=1.23f;
int x_int=(int) a_float;
or: int x_int=(int) (a_float+0.5f);

alongside sin / cos, #include <math.h>

I revieve the l "LNK4210, "msvcrt.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators"

Taken from: http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/5d33a142-b3a3-4ce4-ad71-91f896ab4d62

Another common reason that you would get LNK4210, "msvcrt.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators" is if you are building DEBUG and not including the debug version of the MSVCRT(msvcrtd.dll).
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1292
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #65 on: August 29, 2009 »
I've never seen such an error but it sounds like you want to set "Configuration Properties -> C/C++ -> Code Generation -> Runtime Library" to either "Multi-threaded Debug" or "Multi-threaded Debug DLL"
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #66 on: September 07, 2009 »
Thanks dude, Im not entirely sure if I found the right place for the configuration properties, is there a short cut? I tried altering but i got more errors and sometimes the programs wouldnt run, im a bit baffled at present.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #67 on: September 24, 2009 »
ive just started a new win32 empty project via the wizard, for an updated version of a previous source, i now get the following and a blank screen. exactly the same code too which i could see the effect.

1> CIL library( CIL module) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators

1>MSVCRT.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #68 on: September 24, 2009 »
You've mentioned this before, but none of us can replicate it because you haven't posted a complete project that will build that has the problem.  Can you post a complete buildable project, (libs, source, vcproj file) that shows the problem?

Jim
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #69 on: September 24, 2009 »
I will have a stab at it, as im not completley sure what to include, the release and debug directories, plus the same for the tinyptc lib?
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #70 on: September 24, 2009 »
here's whats in my project folder.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #71 on: September 24, 2009 »
You need to send all the files that end in:
.cpp, .c, .h, .lib, .vcproj

Jim
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #72 on: September 25, 2009 »
Somethings definatly a miss, as that's what i had in the projects directory.
I did notice that it hasnt included the tinyptc libs and headers ( libmmx.lib and tinyptc_ext.lib )

What is the correct process for creating a new windows 32 project without the console window? I opted for empty Win32 for the project thats uploaded, and added existing files for the bitmap1-4.cpp and graphics files.

Cheers,
Clyde
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1292
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #73 on: September 25, 2009 »
Here is a short description of all the different files that are floating around in your project-folder.
The "debug" and "release" folders contain only temporary files which just waste space when sharing your sources.
The only really relevant one has the suffix .vcproj and contains all your project settings and attached files.
If you want someone else to compile your project you need to include all source-, header- and library-files.
If the resulting program loads any auxiliary data from your hard-disc you should include that, too.
Here it seems that your source-files aren't stored in your project-folder but somewhere else on your disc.
That can be quite useful actually, but I doubt this happened intentionally ;)

Quote
What is the correct process for creating a new windows 32 project without the console window? I opted for empty Win32 for the project thats uploaded, and added existing files for the bitmap1-4.cpp and graphics files.
Copy all relevant source-files into your new project-folder before you're adding them to your new project.
Otherwise you'll end up in a complete mess.
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #74 on: September 25, 2009 »
Cheers Hell Fire :)

I dont know why my first 3 projects work and display as should be, but any new ones come up with those two error messages about cil and cpu object; they do build sucessfully but dont display anything what so ever.

I've tried about 12 times now with new projects. And ive not changed a single thing, in regards to libs, headers, filenames, or directory names. I've done what you've suggested in copying via Windows Explorer the source / .cpp files over to the new one, and adding them to the project via the solution explorer.

Im wondering if I need to try modify / repairing the installation of VC express 08. Or infact there are bugs with Visual Studio CPP. Or infact do a clean installation.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1292
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #75 on: September 25, 2009 »
You've mentioned this before, but none of us can replicate it because you haven't posted a complete project that will build that has the problem. 
Can you post a complete buildable project, (libs, source, vcproj file) that shows the problem?
You need to send all the files that end in: .cpp, .c, .h, .lib, .vcproj
Please follow the orders ;)
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #76 on: September 25, 2009 »
That Zip above is with everything that's been generated with the new troublesome priojects.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1292
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #77 on: September 25, 2009 »
The archive above doesn't contain any source-files which makes it a little bit difficult to compile.
And that's why Jim told you which files to include.

« Last Edit: September 25, 2009 by hellfire »
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17394
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #78 on: September 25, 2009 »
Maybe Clyde is scared that someone will rip his routines :p
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] Converting FreeBASIC Pointer Types into a Class
« Reply #79 on: September 25, 2009 »
The project ive uploaded is nothing to fancy pants, also im having major problems now in creating new projects which is stopping any progression.

I can upload the projects that do work ( which have alot more content ) instead of the problems im having with the latest projects that contain just like you mentioned not very much; but that's kind of defeating my query; as what im getting I think is that those files arent being put into the current project for some bug or other reason with building in release / win32.

I had this similar senario when I tried using CPP when it used the net framework, vc 2005.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won: