Original Post

So I definitely didn’t want this to be my first entry post into these forums… but here goes anyway. :/

I just can’t get myself setup correctly for programming! I have gccVB, cygwin, the batch, and the Programmer’s Notepad. I of course configured the batch to work with the correct directories and I already setup the Programmer’s Notepad successfully.

My problem is compiling. Whenever I do, gcc/cpp complain about being unable to locate my compiler. What would I have to tweak in order for them to realize it?

Sorry for noobing it up right off the bat, but thanks for reading through this!

13 Replies

Hey, welcome to the site, HollowedEmpire!

Don’t worry, we all need a little help sometimes… πŸ™‚

Could you post some specific error messages? It would also help to see exactly how your environment is set up (paths, contents of the batch file, etc.). Speaking of paths, did you add the compiler’s “bin” folder to the PATH environment variable? That’s usually what’s wrong when an executable can’t be found (although I think the batch file takes care of this… it’s been quite a while since I used it :-P).

I hope we can get you set up and coding; the more coders the better, I always say (actually, that was the first time I’ve even written it ;-)).

Thanks! πŸ˜€

And I definitely hope to get coding soon too! I was quite excited to find out I could use C instead of straight up Assembly so I’m drooling over that.

Anyhow though, let me see….
This is my error message(s). It seems the other two are just chain problems from the first and from what I saw cpp.exe is sub-run (can’t quite think of a better term) by gcc.exe right?

cpp: f:\vboy\projects\intro_demo\demo.C: C++ compiler not installed on this system cpp: -lang-c: linker input file unused since linking not done gcc: installation problem, cannot exec `cc1′: No such file or directory /BIN/objcopy: f:\vboy\projects\intro_demo\demo.O: No such file or directory

Annnnnnd… here is how I’m currently setup.

This the the gccVB directory:
F:\VBoy\gccVB

I also checked the PATH variable and it was fine too:
F:\VBoy\gccVB\bin

And you mentioned that you haven’t used the batch in a while… is there a more preferred method of doing it now?

Thanks again!

*EDIT – batch did not paste too well. Haha.. here is a better view of the batch:

@echo off
:: If the source file is “C:\GCCVB\EXAMPLE\EXAMPLE.C” call compile.bat as follows:
:: compile C:\GCCVB\EXAMPLE\ EXAMPLE [FILE2.C] … [FILEn.C]
:: Note the space between the path and filename!
:: Note also that only the 2nd and subsequent files have extensions.

SET C_INCLUDE_PATH=F:\VBOY\GCCVB\INCLUDE
SET LIBRARY_PATH=F:\VBOY\GCCVB\LIB
PATH F:\VBOY\GCCVB\BIN;C:\;C:\WINDOWS;C:\WINDOWS\COMMAND

if exist %1%2.VB del %1%2.VB > NUL
cd F:\VBOY\GCCVB\BIN
:: —– Build Header —–
as %1%2.vbh -o %1%2.$$h
objcopy -S -O binary %1%2.$$h %1%2.hdr
if exist %1%2.$$h del %1%2.$$h > NUL

:: —– Build ROM —–
gcc -nodefaultlibs -mv810 -x c -Tvb.ld -o %1%2.O %1%2.C %3 %4 %5 %6 %7 %8 %9
cd %1
F:\VBOY\GCCVB\BIN\objcopy -S -O binary %1%2.O %1%2.VB

:: – Uncomment line below to get an assembly listing of the binary.
:: F:\VBOY\GCCVB\BIN\objdump -d %1%2.O > %1%2.S

:: —– Pad ROM/add header —–
copy /b %1%2.VB /b + %1%2.hdr %1%2.VB /b /y > NUL
padromvb.exe %1%2.VB 15 > NUL
if exist %1%2.O del %1%2.O > NUL
if exist %1%2.hdr del %1%2.hdr > NUL

Sorry for the double post, but I made progress and didn’t want people left out in the dark! πŸ™‚

I finally solved the major “C++ compiler not installed on this system” error I had the other day(s). I ended up replacing the regular gcc.exe from the first bin folder (F:\VBoy\gccVB\bin; for me) with the other one (F:\VBoy\gccVB\v810\bin). Doing that, it now has somehow decided to find the compiler. Awesome right?

However, there are NEW problems! It compiles, but it’s riddled with various amounts of errors that can’t be errors as they are all dealing with the libgccvb.h file that comes with the demo. I’m posting all the errors in hopes someone else encountered this and recognizes the situation I’m in now.

131: `n' undeclared here (not in a function)
131: size of array `WAM' has non-integer type
131: conflicting types for `WAM'
42: previous declaration of `WAM'
131: `gp' undeclared here (not in a function)
131: warning: data definition has no type or storage class
131: stray '\' in program
132: `n' undeclared here (not in a function)
132: size of array `WAM' has non-integer type
132: redefinition of `WAM'
131: `WAM' previously defined here
132: `gy' undeclared here (not in a function)
132: warning: data definition has no type or storage class
134: `n' undeclared here (not in a function)
134: size of array `WAM' has non-integer type
134: redefinition of `WAM'
132: `WAM' previously defined here
134: `mp' undeclared here (not in a function)
134: warning: data definition has no type or storage class
134: stray '\' in program
135: `n' undeclared here (not in a function)
135: size of array `WAM' has non-integer type
135: redefinition of `WAM'
134: `WAM' previously defined here
135: `my' undeclared here (not in a function)
135: warning: data definition has no type or storage class
137: `n' undeclared here (not in a function)
137: size of array `WAM' has non-integer type
137: redefinition of `WAM'
135: `WAM' previously defined here
137: `h' undeclared here (not in a function)
137: warning: data definition has no type or storage class
352: conflicting types for `VIP_REGS'
40: previous declaration of `VIP_REGS'
352: `b' undeclared here (not in a function)
352: warning: data definition has no type or storage class
352: stray '\' in program
353: conflicting types for `VIP_REGS'
352: previous declaration of `VIP_REGS'
353: `c' undeclared here (not in a function)
353: warning: data definition has no type or storage class

I really am not too sure of what’s up (well obviously :-P), but I think it’s some sort of referencing issue? Or it’s interpreting it incorrectly. Is that close? Haha

Thanks again everyone! πŸ™‚ I’m almost there! Then I can finally get to work and hopefully redeem myself of this topic. πŸ˜‰

Hey, it’s nice to see a new face around here! Double nice to see that you’re interested in development!

Are you using the precompiled version of gccVB or are you compiling from source? If I remember correctly, I could never get it to compile correctly from source, but the precompiled version seemed to work well for me out of the box. (I’m primarily a Linux user, so I don’t remember all of the ins and outs of getting gccVB to work on Windows.) I would guess that the errors you’re getting have something to do with the binaries being screwed up/not in the right location. All of the errors you posted look like they’re located in libgccvb, but I’ll bet that’s not where the problem lies… Keep tweaking with it and let us know what happens!

And don’t be afraid to ask “stupid” questions… We’ve all been there, and I think that most of the posts in the development forum would classify as such. πŸ˜€

Thanks man! πŸ™‚ And I definitely am all for development.. which makes this situation that much more annoying for me… a programmer unable to setup an environment. Haha! Visual Studio has spoiled me it seems. πŸ˜›

And yes to both! I tried first using the precompiled binaries, carefully following each set of steps to no real avail. I then tried to compile them myself thinking it may have something to do with how they were compiled, but just like you, I couldn’t get it to compile without error.

And yep, each ‘error’ in the previous post was indeed out of libgccvb oddly enough. And I agree, that script can’t be incorrect. So it’s just a matter of getting everything in the right spot it seems… aye!

I’ll keep messing around with things and see where it goes from there. I’m just glad I got passed it not finding the compiler…

Thanks for the support again!

I think I know what the problem is now. It looks like you’re using this version but trying to run it with a batch-file from the regular Windows cmd shell.

That version is compiled with, and requires, the cygwin shell/environment to run properly. It’s also the source of the errors coming from libgccvb.h, since certain versions of that file are no longer compatible with this older (2.95) branch of gcc. You’re probably using one that works with the 3.x or 4.x branch of gcc (yes, the VB development situation is a bit of a mess, but it’s being worked on!).

In other words, it’s not your fault, since it’s not very clear (yet) what works with what on which system.

Basically, if you want to stick with cmd.exe and batch-files (which I don’t recommend) you need the older compiler. To use the version you have, you need to install cygwin (making sure that make and other development-related packages are installed; just look though and use your instincts, or ask about specifics) and extract the contents of that zip into c:\cygwin\usr (making sure directories are recreated properly; I recommend 7zip).

Then you will be able to use a makefile and building will be much quicker, more robust, and more easily customized. 😎 :thumpup:

  • This reply was modified 13 years, 11 months ago by RunnerPack.

Ah! I suppose that makes sense that the batch doesn’t work like that… I just figured when it called the programs in the batch, it automatically ran them through cygwin instead of just through cmd itself. Haha! Silly me.

And I do have cygwin installed, with the necessary packages listed on the wiki: make, gcc, flex, patch, tar, gzip, autoconf, gperf, bison and a few extras it recommended and defaulted to installing as well. I also unzipped gccVB (precompiled version) to the usr directory.

However, now running in cygwin, I tried to perform ‘make’ on the demo2 of the demos pack, and I run into errors still… interestingly a bunch of them look similar to the ones I mentioned before in the last post… notably going on about `VIP_REGS’ and ‘WAM’ again.

I also tried to compile the source files again through the apparently more ‘authentic’ cygwin window instead of the batch that opened up a cygwin window… seems like it made it farther than before… so hopefully this time it’ll complete. And from what I read, it auto configures itself so I just need to simply type ‘make’ and be set to compile a VB file? (provided there is a Makefile of course ;))
*EDIT – it failed. πŸ™ ERROR 2, building binutils.

If that fails though, I guess I’ll just try out the older version and see if that works out for me. It’d be nice for the newer one to work out, but I’d rather get to program on something than not at all. πŸ™‚

I’ll get back as soon as I can… and actually another quick question… how long do I have til I can’t re-edit a post? Haha

*EDIT 2 –
Old version worked super flawlessly. Haha! I managed to compile and run right away… but is it worth it to try and get the other version to run? What are the major differences between the versions?

  • This reply was modified 13 years, 11 months ago by 16-Bit.

Woot! Glad to hear there’s a new dev’r up and running!

I’m not sure what “versions” you’re talking about… If you mean compiling from source, I don’t think there’s a difference between 2.95 precompiled and building it yourself. Or do you mean the 4.x branch? AFAIK, it still has some kind of function calling bug, so I would stick with 2.95 as it seems to make “good enough” code (at least for my purposes). I don’t think you can even build 2.95 in current cygwin, without installing an older compiler (it currently ships with 4.3.4).

I know! I’m pretty excited myself! πŸ˜€ Thanks for the help with that too!

Oh and haha, guess I was a bit vague there… I meant the major differences between the 06-20-05 version that I got working, and the newer 2.95 version.

06-20-05 is the 4.x version right? …With a function calling bug? Does that mean I can’t use any at all? I guess there is always goto’s… til I can figure out what is wrong with my computer and using the 2.95 version.

HollowedEmpire wrote:

06-20-05 is the 4.x version right? …With a function calling bug? Does that mean I can’t use any at all? I guess there is always goto’s… til I can figure out what is wrong with my computer and using the 2.95 version.

06-20-05 is not using the 4.x version of gcc (it’s in fact older than 2.95) but, it doesn’t contain any major errors and should be fine for you to start out with until the 4.x version has been “standardized”.

And goto’s are NEVER the answer to any problem! πŸ˜‰

Oh whoops. I for some reason kept misreading 4.x to 1.4… how I’ll never know especially after typing it already. Meh. Oh well, I’m just glad I’m up and running now.

Haha and that’s so true… trying to follow goto’s through a program is never a pretty (or sane) thing. I was more on the joking side, but then started to actually think about it a little… *shiver*

Anyhow, I should be good for now. Thanks everyone for the help! I’m going to get coding now! πŸ˜€

HollowedEmpire wrote:
Oh whoops. I for some reason kept misreading 4.x to 1.4… how I’ll never know especially after typing it already. Meh. Oh well, I’m just glad I’m up and running now.

Haha and that’s so true… trying to follow goto’s through a program is never a pretty (or sane) thing. I was more on the joking side, but then started to actually think about it a little… *shiver*

Anyhow, I should be good for now. Thanks everyone for the help! I’m going to get coding now! πŸ˜€

Thanks for your 2011 donation to the site. Would you like 1 Euro refunded to you, or one Euro donated back to the site?

Just in case the PM didn’t make it.. go ahead and donate it. πŸ™‚

 

Write a reply

You must be logged in to reply to this topic.