Cannot build anymore - errors running resource compiler

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
HGAutomator
Posts: 62
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF
Has thanked: 20 times
Been thanked: 9 times

Cannot build anymore - errors running resource compiler

Post by HGAutomator »

I can still call \minigui\batch\compile.bat and build an executable based on a single module. But I've never been able to figure out how to tweak compile.bat to add other object files.

The problem that I'm having now, is with hbmk2. I keep getting an

Error: Running resource compiler. -1


Months ago, hbmk2 was running fine. I'm sure I changed a few paths here and there during installations, but today I made sure that

set MG_ROOT=C:\MINIGUI
set MG_BCC=c:\bcc582

, and that PATHs are set for \harbour\bin.

It almost seems like it's not defaulting to Borland, but rather Mingw. But I can't tell for sure, or explain why.

That was on Windows 10. I tried everying on an XP, as well. In THAT case, there's an error that

gcc.exe: installation problem, cannot exec 'cc1'. No such file or directory. On the XP, MG_ROOT and MG_BCC are also set.

I don't get it. Why are these batch files suddenly not finding the Borland tools?

The only thing I can think of, is that it's related to recently installing Delphi. But I made sure with Rapid Environment Editor, that the PATHs for the harbour compiler in c:\minigui and for c:\bcc582\bin is earlier than anything else.

User avatar
serge_girard
Posts: 2773
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 1071 times
Been thanked: 193 times
Contact:

Post by serge_girard »

Did you have a Windows update?

Serge
Serge Now Is The Happiest Time Of Your Life !

HGAutomator
Posts: 62
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF
Has thanked: 20 times
Been thanked: 9 times

Post by HGAutomator »

Several Windows updates, no doubt. For recent coding, I used compile.bat, because there was only one module.

However, I just realized something this morning. The threads I started recently, are not specific to HMG. They're actually harbour programming and build questions. It's just that I use the HMG batch files regardless of the project type, so it's natural to come here to ask questions.

For this situation, I'll try and set up the project outside of the HMG environment, then try to solve it in that context.

Maybe there's one question you might be able to help with if you can, Serge - is there any way to include several .prg modules, when using \minigui\batch\compile.bat? When there are problems with hbmk2, compile.bat is a fallback.

I don't mind using the IDE, but that seems to require a form. My recent apps are console-based.

User avatar
serge_girard
Posts: 2773
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 1071 times
Been thanked: 193 times
Contact:

Post by serge_girard »

Did you try to build/compile a small PRG into a EXE?
Just a MSGINFO + Quit.

Serge
Serge Now Is The Happiest Time Of Your Life !

HGAutomator
Posts: 62
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF
Has thanked: 20 times
Been thanked: 9 times

Post by HGAutomator »

"Just a MSGINFO + Quit."

Serge,

Sorry, I don't understand what you mean. I have no problem at all generating the executable with the \minigui\batch\compile.bat batch file. This has always worked. But, so far, I can compile only single modules at a time.

At one point, I edited this file, built the .objs ahead of time for the auxiliary modules, and injected them into this compile.bat so that they were included in the response file. That's one workaround, for not being able to compile more than one module into an executable.

Another option, the one I'm using now, is to copy the source code for all the auxiliary modules, into the main source module, and compile.bat with that. That works too, but it's a temporary hack.

So there's no problem at all with compile.bat, for building executables based on a single code module. The issue is with c:\minigui\batch\hbmk2.bat, or with the PATHs or environment variables that it depends on.

Anyway, this isn't HMG's problem, specifically. It's a more general harbour question, so I'll approach it from that angle.

If you want to suggest an IDE, happy to try one. I pulled down Vouch HBIDE over the weekend, but there are major problems with that, and besides it hasn't been updated for almost a decade. Xailer is the most convenient ; they have their project management features down to a science. But as with HMG-IDE it requires a form.

User avatar
serge_girard
Posts: 2773
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 1071 times
Been thanked: 193 times
Contact:

Post by serge_girard »

If it is not HMG maybe try : https://groups.google.com/g/harbour-users

Serge
Serge Now Is The Happiest Time Of Your Life !

HGAutomator
Posts: 62
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF
Has thanked: 20 times
Been thanked: 9 times

Post by HGAutomator »

Yep, thanks Serge. I'll hit that group, if it can't be resolved it by tweaking the environment and re-running the official Harbour Make batches.

Post Reply