Problem with compilation

Robert
Sun Mar 21 21:30:06 PDT 2010



--- In BCX at yahoogroups.com, Roman Sokol <rsokol at ...> wrote:
>
> Hi,
>     I found what is it and is really my fault. But to defend myself :-),
> I show you what makes me wrong.
> if(stricmp(metric,"PIXELS")==0)            <== breakpoint here
>   {
>     BCX_ScaleX=1;
>     BCX_ScaleY=1;
>   }
> else
>   {
> ...
>   }
>     Shortened code above produced by BCX in BCX_SetMetric you know and
> with breakpoint is row, after which app disappears. No error except
> process returned code 1, no debug 'caught in action', nothing visibly
> wrong in watches etc. No matter if Step Into or Go. When changed to
> 'strcmp' directly in C, app started with double size (I think, as
> borders are invisible). With changes I tell you before all is working.
> And here is translated FormLoad (also shortened to what is important).
> void FormLoad (void)
> {
> ...
>   MainForm=BCX_Form(...);
> ...
>   txtConsole=BCX_Edit(...);
>   Center(MainForm);
>   Show(MainForm);
>   if(!Exist(join(2,AppExePath(),"Data.db")))
>     {
>     ... some code recreating non existing database ...
>     BCX_THREAD(DBFImport);  <== And this is a winner
>     When I started working on this, I forgot that updating console will
> require importing sub in thread, so runtime was defined Singlethreaded
> LIB in PellesC project. That's all for solution, but it leaves me in
> wonder. The 'Row of Fall' is long way before any threading. It is
> actually If ... Then decision which is perfectly clear to be solved and
> many code after it executed before error occurs, at least from my view.
> But, in fact, my view 'powered' :-) by my knowledge about C is like
> window not cleaned for centuries (Is it fly what I see on other side?
> Also it may be an elephant in distance, off course.), so if you wish
> tell me something about this quiz, it will be really appreciated. But
> it's no longer problem and especially not yours, as BCX is completely
> innocent, so don't waste time on it.
>     Jesus, I'm always story teller!
>     Thanks again and Have  nice rest of a day wherever you are
> Roman
> 
> 

Hi Roman:

When compiling BCX generated C code with the Pelles C IDE be sure that you have done the following.

In the Pelle's C IDE click on Project on the menu bar.

Click on Project Options.

Click on the Compiler tab.

In the Options group box check the following boxes
Enable Microsoft extensions
Enable Pelles C extensions
Define Compatibility names

These items correspond to the pocc command line options -Ze, -Zx and -Go which should be present if you are compiling BCX generated C code from the command line or a batch file.

Robert Wishlaw


> 
> 
> Dne 21.3.2010 23:55, Roman Sokol napsal(a):
> >  
> >
> > Hi,
> > Yep, that is what I need listen from anyone who know. Problem is
> > somewhere in the darkness ;-). When I read your post, I immediately
> > start prepare sample without dependencies to upload, building it with
> > unmodified BCX to show what happen, and - surprise - it starts
> > correctly. What is it? I'm happy for my app is an early stage and
> > simple, so low on row count, but right now I can not imagine what is
> > merit. And how these modification of BCX solved it? The stuff I cut
> > out is exactly manipulating with sqlite and not with form in any way.
> > Hmmm.
> > I really thank you to tell me that these mods are wrong, even if they
> > work for me. I will search in right way. Yeah, Yeah, I'm that man who
> > kick his own ...
> > Thank you again and have nice day
> > Roman
> >
> > Dne 21.3.2010 23:48, Robert napsal(a):
> > >
> > >
> > >
> > >
> > > --- In BCX at yahoogroups.com <mailto:BCX%40yahoogroups.com>
> > <mailto:BCX%40yahoogroups.com>, Roman Sokol
> > > <rsokol@> wrote:
> > > >
> > > > Hello,
> > > > I had problem compiling my app (with latest PellesC compiler), but I
> > > solve it and because 'solution' lay on modification of BCX source, I'm
> > > sure it's something you should know. Here it is: When compiling as is,
> > > app go down on calling BCX_SetMetric without any error (or produced
> > > error). When I replaced 'stricmp' with 'strcmp', app started, but with
> > > incorrect (huge) size. So I did these corrections:
> > > > - Search and replace 'stricmp' with 'strcmp'
> > > > - Unifying on "pixels" by replacing:
> > > > - on line 24265 "PIXELS"
> > > > - on line 24387 "Pixels"
> > > > - on line 24408 "PIXELS"
> > > > I hope this is right and accepted for future releases, so I must not
> > > do it for every new release :-), such as, to be serious, some time
> > > did. Or maybe you identify different reason why this happen and this
> > > will no longer be needed. I don't know enough about BCX (and about C
> > > very less) to go deeper. So I reported it and you may find something
> > > useful on this.
> > > > Best regards
> > > > Roman
> > > >
> > >
> > > Hi Roman:
> > >
> > > Please post your code or a short example that demonstrates the problem
> > > that you are having.
> > >
> > > Your proposed modifications to the BCX source code are absolutely
> > > WRONG and will break many functions.
> > >
> > > Robert Wishlaw
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > 
> 
> 
> [Non-text portions of this message have been removed]
>



           



More information about the BCX mailing list