Creating premake project for PuTTYTray - c

I'm trying to use Premake 4 to create VS2013 project files for PuTTYTray.
Initially I'm trying to build just putty.exe but I'd like to be able to build the original suite, based on the original project files.
solution "PuTTYTray"
configurations {"Debug", "Release"}
project "PuTTY"
kind "ConsoleApp"
language "C++"
files {
"*.h",
"*.c",
"windows/**.c",
"windows/**.h"
}
excludes {
"pscp.c",
"be_all.c",
"psftp.c",
"be_all_u.c",
"be_none.c",
"be_nos*",
"be_ssh.c",
"nocproxy.c",
"puttytel*",
"notiming.c",
"noterm.c",
"noprint.c",
"noshare.c",
"pproxy.c",
"windows/wincons.c",
"cmdgen.c",
"time.c",
"windows/winnojmp.c",
"windows/winplink.c",
"windows/winsftp.c",
}
defines {
"_WINDOWS",
"NO_GSSAPI",
"WIN32",
"SECURITY_WIN32",
"_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1",
"_CRT_SECURE_NO_WARNINGS=1"
}
links {
"advapi32",
"comctl32",
"imm32",
"winmm"
}
includedirs {"windows","unix","."}
I believe I have the config set up similarly to the original but I get the following errors:
Error 34 error C1083: Cannot open include file: 'termios.h': No such file or directory D:\Git\Other\PuTTYTray\windows\cthelper\ptyfork.c 2 1 PuTTY
Error 15 error C1083: Cannot open include file: 'unistd.h': No such file or directory D:\Git\Other\PuTTYTray\windows\cthelper\buffer.c 4 1 PuTTY
Error 16 error C1083: Cannot open include file: 'unistd.h': No such file or directory D:\Git\Other\PuTTYTray\windows\cthelper\cthelper.c 4 1 PuTTY
Error 17 error C1083: Cannot open include file: 'unistd.h': No such file or directory d:\git\other\puttytray\windows\cthelper\ourhdr.h 10 1 PuTTY
Error 35 error C1083: Cannot open include file: 'unistd.h': No such file or directory d:\git\other\puttytray\windows\cthelper\ourhdr.h 10 1 PuTTY
Error 22 error C2059: syntax error : ')' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
...
Error 19 error C2061: syntax error : identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
Error 30 error C2061: syntax error : identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 24 error C2061: syntax error : identifier 'nmemb' d:\git\other\puttytray\windows\cthelper\mm.h 9 1 PuTTY
Error 29 error C2081: 'ssize_t' : name in formal parameter list illegal d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 18 error C2146: syntax error : missing ')' before identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
Error 28 error C2146: syntax error : missing ')' before identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 23 error C2146: syntax error : missing ')' before identifier 'nmemb' d:\git\other\puttytray\windows\cthelper\mm.h 9 1 PuTTY
What can I do to get closer to the mark? I'm not really understanding what I'm doing wrong here.

The issue was I didn't have the correct list of excludes - the original project files can be generated by running a perl script in the root of the source.
With the correct excludes and some extra library imports I can create and use the solution successfully.
#ostrokarch's note pointed me in the right direction here.

Related

Using wagtail start mysite returns syntax error

I am using pip, virtualenv and Python 3 to install wagtail. I am working on Ubuntu.
To backtrack a bit:
I was trying to install initially and got this error:
unicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 47: ordinal not in range(128)
I fixed this by changing my env to use Python 3.
This allows wagtail to start installing, but returned this list of errors while installing:
SyntaxError: invalid syntax
*** Error compiling '/home/ubuntu/workspace/env/build/Django/django/utils/feedgenerator.py'...
File "/home/ubuntu/workspace/env/build/Django/django/utils/feedgenerator.py", line 82
**kwargs,
^
SyntaxError: invalid syntax
*** Error compiling '/home/ubuntu/workspace/env/build/Django/django/utils/functional.py'...
File "/home/ubuntu/workspace/env/build/Django/django/utils/functional.py", line 12
return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
^
SyntaxError: invalid syntax
*** Error compiling '/home/ubuntu/workspace/env/build/Django/django/utils/log.py'...
File "/home/ubuntu/workspace/env/build/Django/django/utils/log.py", line 229
)
^
SyntaxError: invalid syntax
*** Error compiling '/home/ubuntu/workspace/env/build/Django/django/utils/tree.py'...
l File "/home/ubuntu/workspace/env/build/Django/django/utils/tree.py", line 76
return hash((self.__class__, self.connector, self.negated, *make_hashable(self.children)))
^
SyntaxError: can use starred expression only as assignment target
It gave me a success message despite the syntax errors.
Successfully installed wagtail html5lib Django six Unidecode draftjs-exporter djangorestframework django-taggit pytz django-modelcluster Willow Pillow beautifulsoup4 requests django-treebeard webencodings urllib3 chardet idna certifi
Cleaning up...
After trying to start wagtail I have this final error message:
Traceback (most recent call last):
File "/home/ubuntu/workspace/env/bin/wagtail", line 7, in <module>
from wagtail.bin.wagtail import main
File "/home/ubuntu/workspace/env/lib/python3.4/site-packages/wagtail/bin/wagtail.py", line 10, in <module>
from django.core.management import ManagementUtility
File "/home/ubuntu/workspace/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 11, in <module>
from django.conf import settings
File "/home/ubuntu/workspace/env/lib/python3.4/site-packages/django/conf/__init__.py", line 18, in <module>
from django.utils.functional import LazyObject, empty
File "/home/ubuntu/workspace/env/lib/python3.4/site-packages/django/utils/functional.py", line 12
return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
This final error is the one I have not been able to solve. I opened the file functional.py and reviewed the contents and it looks correct to me. Any ideas on how to fix the error or what the root cause could be?
You are running Python 3.4, which is not supported by the current version of Django (2.1). You should either upgrade to Python 3.5 or above, or downgrade Django to 2.0.x by running pip install "Django>=2.0,<2.1".

FosUserBundle + Symfony 3.4

Since 7 days I tried to repair HwiOauthFukingBundle with facebook + FosUserOtherFukingBundle + Symfony 3.4.
And now, I have this incomprehensible errors in prod but not in dev.
[2018-03-17 14:45:27] php.WARNING: Warning:
require(/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php):
failed to open stream: No such file or directory
{"exception":"[object] (ErrorException(code: 0): Warning:
require(/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php):
failed to open stream: No such file or directory at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:223)"}
[]
And this one
[2018-03-17 14:45:27] request.CRITICAL: Uncaught PHP Exception
Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error:
require(): Failed opening required
'/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php'
(include_path='.:/opt/plesk/php/7.1/share/pear')" at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
line 223 {"exception":"[object]
(Symfony\Component\Debug\Exception\FatalErrorException(code: 0):
Compile Error: require(): Failed opening required
'/var/www/vhosts/domaine.fr/var/cache/prod/doctrine/orm/Proxies/__CG__ECUserBundleEntityImage.php'
(include_path='.:/opt/plesk/php/7.1/share/pear') at
/var/www/vhosts/domaine.fr/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:223)"}
[]
What's going on ?
I have clean the cache folder etc. but this error seems to be falling from the sky... this is a nightmare...

Getting error while compiling in keil?

I am working with MK60N512MD100 (TWR-K60N512 tower kit) I am trying to extract Freescale_USB_Stack_v4.1.1 and creating my own project, But I am getting following error even after I copied all related files.
***********************error LOG ************************
> main_kinetis.c: 5 warnings, 0 errors linking... .\USB_DEV.axf:
> Warning: L6304W: Duplicate input file .\startup_mk60n512md100.o
> ignored. .\USB_DEV.axf: Error: L6320W: Ignoring --entry command.
> Cannot find argument 'Reset_Handler'. .\USB_DEV.axf: Warning: L6320W:
> Ignoring --first command. Cannot find argument '__Vectors'. Not enough
> information to list image symbols. Not enough information to list the
> image map. Finished: 2 information, 2 warning and 1 error messages.
> ".\USB_DEV.axf" - 1 Error(s), 7 Warning(s). Target not created
Please help me in resolving this issue.

Exception in android build. Build error in codenameone

Hello I have tried to build an application and send it to an android build but am getting an build error.
This is a small snippet of exception in error log that I got when I put the build onto the server.
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : java.lang.RuntimeException: Exception parsing classes
Unknown source file : at com.android.dx.command.dexer.Main.processClass(Main.java:752)
Unknown source file : at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
Unknown source file : at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
Unknown source file : at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
Unknown source file : at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
Unknown source file : at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
Unknown source file : at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
Unknown source file : at com.android.dx.command.dexer.Main.processOne(Main.java:672)
Unknown source file : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : at com.android.dx.command.Main.main(Main.java:106)
Unknown source file : Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
Unknown source file : at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
Unknown source file : at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
Unknown source file : at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
Unknown source file : at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
Unknown source file : at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
Unknown source file : at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
Unknown source file : at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
Unknown source file : at com.android.dx.command.dexer.Main.processClass(Main.java:749)
Unknown source file : ... 12 more
Unknown source file : 1 error; aborting
:preDexDebug FAILED
:preDexDebug (Thread[Daemon worker,5,main]) completed. Took 56.932 secs.
Starting process 'command '/usr/java/jdk1.7.0_67/bin/java''. Working directory: /tmp/build2186746778357232766xxx/Starter Command: /usr/java/jdk1.7.0_67/bin/java -Xmx2048M -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/ec2-user/android-sdk/build-tools/23.0.1/lib/dx.jar com.android.dx.command.Main --dex --verbose --force-jumbo --num-threads=4 --output /tmp/build2186746778357232766xxx/Starter/build/intermediates/pre-dexed/debug/classes-050c44252ac48b6fb75508d313fd95ce08e1abcc.jar /tmp/build2186746778357232766xxx/Starter/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.3.0/jars/classes.jar
FAILURE: Build failed with an exception.
Please find the attached error log
This was due to us changing the behavior of Google Play Services. We are looking to redeploy the change with a slightly more conservative approach so we would still need the error log to confirm exactly what went wrong.
same happen for me
Log
com.codename1.social.GoogleImpl.init();
^
symbol: class GoogleImpl
location: package com.codename1.social
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:compileReleaseJavaWithJavac FAILED
:compileReleaseJavaWithJavac (Thread[Daemon worker,5,main]) completed. Took 21.094 secs.

can't get orcc code to run using C backend with visual studio 2010

So I've created an ORCC project on eclipse and I've compiled my main network successfully and I generated the visual studio 2010 solution using CMake.
But when I try to run my generated solution i get a lot of compilation errors of undeclared identifiers and unrecognized methods.
I thought the whole point of the back end generated by eclipse is that it should run out of the box without the need for me to edit anything.
Any Help is appreciated, thank you.
here is a sample of the errors, if you want me to attach the whole error list, let me know.
Error 295 error C2039: 'read_inds' : is not a member of 'fifo_i16_s'
397 1 network
Error 297 error C2039: 'read_inds' : is not a member of 'fifo_i16_s'
558 1 network
Error 71 error C2065: 'cpu_set_t' : undeclared identifier
222 1 network
Error 73 error C2065: 'cpuset' : undeclared identifier 222 1 network
Error 104 error C2065: 'cpuset' : undeclared identifier 237 1 network
Error 121 error C2065: 'cpuset' : undeclared identifier 242 1 network
Error 85 error C2065: 'mapping' : undeclared identifier 232 1 network
I suggest you try with a more recent version of Orcc, they have improved the code generator, which now exports everything that is needed (including libraries and headers).
If it does not work, you can also send an email to the Orcc mailing list or contact them on IRC directly (details on the project's homepage http://orcc.sourceforge.net/).

Resources